<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"  %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>修改头像</title>
		<style type="text/css">
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}

.STYLE1 {
	font-size: 12px
}

.STYLE3 {
	font-size: 12px;
	font-weight: bold;
}

.STYLE4 {
	color: #03515d;
	font-size: 12px;
}

.td_bg {
	font-size: 13px;
	background: #fff;
	border:1px solid #6495ED;
}

/*表单项的字体格式*/
.td_x_bg {
	font-size: 13px;
	font-weight: bold;
	text-align: center;
	background: #BDE3FB;
	border:1px solid #6495ED;
}

.table {
	margin-top: 10px;
}
</style>
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/checkUtil.js"></script>
	</head>

	<body>
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td height="30" background="images/main/tab_05.gif">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="12" height="30">
								<img src="images/main/tab_03.gif" width="12" height="30" />
							</td>
							<td>
								<table width="100%" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td width="46%" valign="middle">
											<table width="100%" border="0" cellspacing="0"
												cellpadding="0">
												<tr>
													<td width="5%">
														<div align="center">
															<img src="images/main/tb.gif" width="16" height="16" />
														</div>
													</td>
													<td width="95%" class="STYLE1">
														<span class="STYLE3">你当前的位置</span>：
														<s:if test="user.id in {#session.user.id}">
															[队员管理]-[我的头像信息]
														</s:if>
														<s:else>
															[队员管理]-[队员-<b><s:property value="user.name"/></b> 的头像信息]
														</s:else>
													</td>
												</tr>
											</table>
										</td>
										<td width="54%">
											<table border="0" align="right" cellpadding="0"
												cellspacing="0">
												<tr>
													<td width="80">
														<table width="90%" border="0" cellpadding="0"
															cellspacing="0">
															<tr>
																<td>
																	&nbsp;
																</td>
															</tr>
														</table>
													</td>
													<td width="60">
														<table width="90%" border="0" cellpadding="0"
															cellspacing="0">
															<tr>
																<td class="STYLE1"></td>
																<td class="STYLE1"><br></td>
															</tr>
														</table>
													</td>
												</tr>
											</table>
										</td>
									</tr>
								</table>
							</td>
							<td width="16">
								<img src="images/main/tab_07.gif" width="16" height="30" />
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="8" background="images/main/tab_12.gif">
								&nbsp;
							</td>
							<td>
								
									
								<form action="" method="post" name="headform" enctype="multipart/form-data" onsubmit="return dd();">
								<table class="table" border="1" width="70%" align="center"
									cellpadding="2" cellspacing="2" bordercolor="#6495ED">
									<tbody>

										<tr>
											<td class="td_bg" rowspan="3" valign="top" align="center" style="width:250px;" />
												<nobr>
													头像<br />
													<img src=<s:property value="user.headImg.imgSrc" /> width="120" id="pic"/>
												</nobr>
											</td>
										
											<td class="td_bg" style="height:40px;">
												<input type="file" name="upload" id="upload" onchange="checkMHImgForm()" size=40 style="height:30px;"/>
												<span style="color:red;font-size:12px;float:left;position:absolute;">
													<s:if test="%{#wrong == 0}">
													         文件格式只能为jpg,gif或png！
													</s:if>
													<s:elseif test="%{#wrong == 1}">
													        请选择图片！
													</s:elseif>
													<s:elseif test="%{#wrong == 2}">
													         更改头像失败!
													</s:elseif>
													<s:elseif test="%{#wrong == 3}">
													    图片不能大于200K<br />你选择的图片大小为<s:property value="%{#filesize/1024}" />K 
													</s:elseif>	
												</span>
											</td>
										</tr>
										<tr>
											<td class="td_bg" style="padding:0;">
												<table width="100%" border="0" cellpadding="0" cellspacing="0">
													<tr >
														<td style="background:#BDE3FB;font-size:12px;padding:2px;">
															用户历史头像信息
														</td>
													</tr>
													<tr>
														<td>
															<iframe src="front/getMemberHeadImgList.action?user.id=<s:property value="user.id" />" style="border-style:none;" width="550" height="150" ></iframe>
														</td>
													</tr>
												</table>
											</td>
										</tr>
										<tr>
											<td class="td_bg">
												<input type="hidden" name="user.id" value="<s:property value="user.id" />" />
												<input type="hidden" name="user.headImg.id" value="" id="headId" />
												<input type="submit" value="保存" style="width:80px;height:30px;margin-left:60px;" />
												<input type="reset" value="重置" style="width:80px;height:30px;margin-left:30px;" />
											</td>
										</tr>
									</tbody>
								</table>
							</td>
							<td width="8" background="images/main/tab_15.gif">
								&nbsp;
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td height="35" background="images/main/tab_19.gif">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="12" height="35">
								<img src="images/main/tab_18.gif" width="12" height="35" />
							</td>
							<td>
								<form action="" method="get">
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td>
												&nbsp;
											</td>
										</tr>
									</table>
								</form>
							</td>
							<td width="16">
								<img src="images/main/tab_20.gif" width="16" height="35" />
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	</body>
</html>
